<template>
<!-- 顶部栏 -->
<AppNavbar></AppNavbar>
<!-- 头部组件 -->
<AppHeader></AppHeader>
<!-- 吸顶头部 -->
<AppHeaderSticky></AppHeaderSticky>
<!-- 内容 -->
<div class="app-body">
  <RouterView></RouterView>
</div>
<!-- 底部组件 -->
<AppFooter></AppFooter>
</template>

<script>
import AppNavbar from '@/components/app-navbar.vue'
import AppHeader from '@/components/app-header.vue'
import AppFooter from '@/components/app-footer.vue'
import AppHeaderSticky from '@/components/app-header-sticky.vue'
import { useStore } from 'vuex'
export default {
  name: 'MyLayout',
  components: {
    AppNavbar,
    AppHeader,
    AppFooter,
    AppHeaderSticky
  },
  setup () {
    const store = useStore()
    // 渲染数据
    store.dispatch('category/getList')
  }
}
</script>

<style scoped lang="less">
.app-body{
  min-height: 600px;
}
</style>
